package com.chinasoft.movies.controller;

import com.chinasoft.movies.pojo.DirectorByPopularity;
//import com.chinasoft.movies.pojo.Genre_top_by_vote;
import com.chinasoft.movies.service.DirectorByPopularityService;
//import com.chinasoft.movies.service.Genre_top_by_voteService;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Log4j2
@CrossOrigin
public class DirectorByPopularityController {
    @Autowired
    DirectorByPopularityService directorByPopularityService;


    @GetMapping(("/directorByPopularity/queryAll"))
    public List<DirectorByPopularity> queryAll()
    {
        return directorByPopularityService.getAllDirectorByPopularity();
    }
}
